package cn.azzhu.day02

import org.apache.flink.streaming.api.scala._

/**
 * @author azzhu
 * @create 2020-09-20 23:29:18
 */
object ConsumeFromSensorSource {
  def main(args: Array[String]): Unit = {
    //todo 1.获取执行环境
    val env = StreamExecutionEnvironment.getExecutionEnvironment

    //todo 2.数据源
    val stream = env.addSource(new SensorSource)

    //todo 3.输出
    stream.print()

    //todo 4.执行
    env.execute("ConsumeFromSensorSource")
  }
}
